<template>
  <div>
    <el-input
        size='small'
        v-model="input"
        placeholder="请输入年龄"
        clearable
        maxlength="64"
        style="width:15%"
        show-word-limit
    ></el-input>
    <el-button
        size="small"
        style="margin-left: 20px;"
        @click="wordsSend"
    >发送</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      input: '',
    };
  },
  methods: {
    wordsSend() {
      var self = this;
      self.$axios.get('/rname/addName',{
        params:{
          age:self.input
        },
      }).then((res) =>{
        if(res.data.code === 200){
          this.$message({
            message: res.data.data,
            type: 'success'
          });
        }
      });
    },
  },
}
</script>

<style scoped>

</style>
